<template>
  <p>{{ userStore.user }}</p>
  <button @click="gologin">登录</button>
  <button @click="userStore.delUser()">退出</button>
</template>

<script setup lang="ts">
import { request } from './uitls/request'
import { useUserStore } from '@/stores/modules/user'
import type { User } from './types/user'
const userStore = useUserStore()

const gologin = async () => {
  let res = await request<User>('/login/password', 'POST', {
    mobile: '13211112222',
    password: 'abc12345'
  })
  console.log(res)
}
</script>

<style scoped></style>
